package multithread;
public class InstanceInitializer {  
	
//	Java是按照编程顺序来执行实例变量初始化器和实例初始化器中的代码的
	
	
    private int j = getI();  //i未初始化
    private int i = 1;  

    public InstanceInitializer() {  
        i = 2;  
    }  

//    public InstanceInitializer(int s) {  
//    }  
    private int getI() {  
        return i;  
    }  

    public static void main(String[] args) {  
        InstanceInitializer ii = new InstanceInitializer();  
        System.out.println(ii.j);  //0
    }  
}  